<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false"%>
<html>
<head>
<link href="resource/bootstrap-3.3.0/css/bootstrap.min.css"
	rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="container">
		<ul class="nav nav-pills">
			<li role="presentation" class="active"><a href="ShowCheckShop">Check</a></li>
			<li role="presentation"><a href="ShowManageShop">Managerment</a></li>
		</ul>
	</div>
	<div class="container">
		<table class="table">
			<tr>
				<td>ShopName</td>
				<td>ShopNumber</td>
				<td>LegalName</td>
				<td>IdNumber</td>
				<td>Phone</td>
				<td>Address</td>
				<td>SignTime</td>
				<td>Describe</td>
				<td>Available</td>
				<td>PASS/NOPASS</td>
			</tr>
			<c:forEach var="check" items="${checks}" varStatus="status">
				<tr>
					<td>${check.shopName}</td>
					<td>${check.shopNumber}</td>
					<td>${check.legalName}</td>
					<td>${check.idNumber}</td>
					<td>${check.sPhone}</td>
					<td>${check.address}</td>
					<td>${check.signTime}</td>
					<td>${check.describe}</td>
					<td>${check.checksId}</td>
					<c:choose>
						<c:when test="${check.available == 0}">
							<td>待审核</td>
						</c:when>
						<c:when test="${check.available == 1}">
							<td>通过审核</td>
						</c:when>
						<c:when test="${check.available == -1}">
							<td>不通过</td>
						</c:when>
					</c:choose>
					<c:choose>
						<c:when test="${check.available == 0}">
							<td><a class="btn btn-primary btn-xs"
								href="ChangeAvailable?index=${status.index}" role="button">PASS</a></td>
						</c:when>
						<c:when test="${check.available == 1}">
							<td><a class="btn btn-warning btn-xs"
								href="ChangeAvailable?index=${status.index}" role="button">NOPASS</a></td>
						</c:when>
					</c:choose>
				</tr>
			</c:forEach>
		</table>
	</div>
	<div class="container  col-md-offset-10">
		<a class="btn btn-primary" href="PassShops?index=${checks}" role="button">Submit</a>
	</div>
</body>
</html>
